package example1;
/**
 * @Author:DarknessShadow
 * @description:
 * @date 2020/5/13 10:47
 */
public class Main {
    public static void main(String[] args) {
        String arg = "plain";
        if ("plain".equals(arg)) {
            TextBuilder textBuilder = new TextBuilder();
            Director director = new Director(textBuilder);
            director.construct();
            String result = textBuilder.getResult();
            System.out.println(result);
        } else if ("html".equals(arg)) {
            HTMLBuilder htmlBuilder = new HTMLBuilder();
            Director director = new Director(htmlBuilder);
            director.construct();
            String filename = htmlBuilder.getResult();
            System.out.println(filename + "文件编写完成");
        }
    }
}
